﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shark.Extensions
{
    public static class StringExt
    {
        /// <summary>
        /// 字符串从左截取num个字符
        /// </summary>
        /// <param name="str"></param>
        /// <param name="num"></param>
        /// <returns></returns>
        public static string LTrimNum(this string str,int num)
       {
           return str.Substring(0, num);
       }
        /// <summary>
        /// 字符串从右截取num个字符
        /// </summary>
        /// <param name="str"></param>
        /// <param name="num"></param>
        /// <returns></returns>
        public static string RTrimNum(this string str, int num)
       {
           return str.Substring(str.Length-num, num);
       }

    }




}
